﻿using System.Web.UI;
using TSharp.Core.Web.Message.MessageImpl;

namespace System
{
    /// <summary>
    ///  
    /// <para>by tangjingbo at 2009/12/10 21:22</para>
    /// </summary>
    public static class Exte
    {
        // static private Dictionary<Control, ISituation> list = new Dictionary<Control, ISituation>();
        /// <summary>
        /// 获取消息注册或发送的情景
        /// <para>by tangjingbo at 2009/12/10 21:23</para>
        /// </summary>
        /// <param name="ctl">The CTL.</param>
        /// <returns></returns>
        public static ISituation GetSituation(this Control ctl)
        {
            //if (!list.ContainsKey(ctl))
            //{
            //    ISituation tmp = new SituationImpl(ctl);
            //    list.Add(ctl, tmp);
            //    return tmp;
            //}
            //return list[ctl];
            return new SituationImpl(ctl);
        }
    }
}